var dataTest = []
for(var i=0;i<100;i++){
    var x = Math.floor(100*Math.random());
    var y = Math.floor(100*Math.random());
    dataTest.push([x,y]);
};

var myChart1 = echarts.init(document.getElementById("b1"),'dark')
var option1 = {
    xAxis: {},
    yAxis: {},
    title: {
        text: '石子落地位置--沈林涛',
        left: 'center',
    },
    series:{
        type:'scatter',
        data:dataTest,
        symbolSize: 5, 
    },
};
myChart1.setOption(option1);
//-----------------------------------------------------------------
var dataTest = []
for(var i=0;i<100;i++){
    var x = Math.floor(100*Math.random());
    var y = Math.floor(100*Math.random());
    dataTest.push([x,y]);
};

var myChart2 = echarts.init(document.getElementById("b2"))
var option2 = {
    xAxis: {},
    yAxis: {},
    title: {
        text: '石子落地位置--沈林涛',
        left: 'center',
    },
    series:{
        type:'scatter',
        data:dataTest,
        symbolSize: 5, 
    },
};
myChart2.setOption(option2);

var myChart3 = echarts.init(document.getElementById("b3"))
var option3 = {
    series:{
        type:'pie',
        data:[
            {value:5500,name:"产品A"},
            {value:4200,name:"产品B"},
            {value:3200,name:"产品C"},
        ],
    },
    title: {
        text: '产品占比',
        subtext: '沈林涛',
    },
    legend: {
        orient: 'vertical',
        left: 'left',
        top:'50px',
    },
};
myChart3.setOption(option3)
//-----------------------------------------------------------------
var myChart4 = echarts.init(document.getElementById("b4"))
var option4 = {
    title:{
        text:"手机品牌销量对比-沈林涛",
        left: 'center',
    },
    xAxis: {
        type: 'category',
        name:"年份",
        // data: ["2012","2013","2014","2015","2016","2017","2018","2019","2020"],
        data:["产品A","产品B","产品C"]
    },
    yAxis: {
        name: "Y",
        min: 0,
        max: 6000,
    },
    series: [{
        type:'bar',
        data:[
            {value:5500,name:"产品A"},
            {value:4200,name:"产品B"},
            {value:3200,name:"产品C"},
        ],
        label: {
            show: true,
            position: 'top',
        }, 
    }
  ],
}
myChart4.setOption(option4)
